import { api } from '@/servers/api'
import { getData } from '@/servers/http'
import { observer } from 'mobx-react'
import { useEffect, useState } from 'react'
import Picture from './components/Picture'
import Vision from './components/Vision'
import EvaluationResult from '@/components/FileEvaluation'
import styles from './index.module.less'

export default observer(() => {
    const [info, setInfo] = useState<any>()

    const getLevelInfo = (id?: any) => {
        getData(`${api.usersMyRecord}`, { id }).then(res => {
            setInfo(res.data)
            console.log(res.data)
        })
    }

    useEffect(() => {
        getLevelInfo()
    }, [])

    return (
        <div className={styles.page}>
            <div className={styles.content}>
                <div className={styles.top_view}>
                    <Vision info={info} />
                    {/* <Picture info={info} /> */}
                    <EvaluationResult />
                </div>
                <div className={styles.next} />
            </div>
        </div>
    )
})
